package com.edu.design.prototype;

import org.junit.Before;
import org.junit.Test;

import com.edu.common.model.KvEntity;

public class CaseTest {

	@Before
	public void setUp() throws Exception {
	}

	@Test
	public void test() {
		try {
			KvEntity kv = new KvEntity("key.1", "value.1");
			Prototype prototype = new Prototype();
			prototype.setName("no.1");
			prototype.setObject(kv);
			Prototype prototype2 = (Prototype) prototype.clone();
			System.out.println(prototype==prototype2);
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
	}

}
